<template>
  <view class="container">
			<view class="con">
				<view class="box" v-for="item in pets" :key="item._id">
					<view class="pic">
						<image :src="item.url" mode="widthFix"></image>
					</view>
					<view class="text">{{item.content}}</view>
					<view class="author">———{{item.author}}</view>
				</view>
			</view>
  </view>
</template>

<script setup>
import {ref} from "vue" ;
const pets = ref([]);

function network(){
	uni.request({
		url:'https://tea.qingnian8.com/tools/petShow',
		data:{
			size:10
		}
	}).then(res=>{
		console.log(res.data.data);
		pets.value = res.data.data
	})
}
network();
</script>

<style lang="scss" scoped>
.con{
	padding: 2.1rem;
}
.box{
	margin-bottom: 60rpx;
	box-shadow: 0 10rpx 40rpx #ddd;
	border-radius: 15rpx;
	overflow: hidden;
}
.pic image{
width: 100%;
}
.text{
	padding: 30rpx;
	color: #333;
	font-size: 36rpx
}
.author{
	padding: 0 30rpx 30rpx;
	text-align: right;
	color: #888;
	font-size: 28rpx;
}
</style>